function Person() {}

Person.prototype.name = "bill";
Person.prototype.address = "GuangZhou";
Person.sayName = function() {
    alert(this.name);
}

var person1 = new Person();
var person2 = new Person();

//测试代码
alert(person1.name); // bill
alert(person2.name); // bill
person1.sayName(); //bill
person2.sayName(); //bill

person1.name = "666";

alert(person1.name); // 666
alert(person2.name); // bill
person1.sayName(); //666
person2.sayName(); //bill